package com.easylinkin.linkappapi.machinery.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.easylinkin.linkappapi.common.model.RequestModel;
import com.easylinkin.linkappapi.device.entity.Device;
import com.easylinkin.linkappapi.machinery.dto.MachineryIotDeviceDto;
import com.easylinkin.linkappapi.machinery.dto.TowerCraneWorkStatisticsDTO;
import com.easylinkin.linkappapi.machinery.entity.TowerCraneCollisionAlarmRecord;
import com.easylinkin.linkappapi.machinery.entity.TowerCraneWorkRecord;
import com.easylinkin.linkappapi.machinery.vo.TowerCraneWorkStatisticsVO;
import com.easylinkin.linkappapi.openapi.dto.DatapushDTO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 塔吊工作循环记录 服务类
 * </p>
 *
 * @author Xiaoyang
 * @since 2022-08-14
 */
public interface TowerCraneWorkRecordService extends IService<TowerCraneWorkRecord> {

  List<TowerCraneWorkRecord> getStatisticsList(TowerCraneWorkStatisticsVO statisticsVO);

  Map<Integer,List<TowerCraneWorkStatisticsVO>> getStatisticsOrderByMachinery(TowerCraneWorkStatisticsVO statisticsVO);

  TowerCraneWorkStatisticsDTO getStatisticsSum(TowerCraneWorkStatisticsVO statisticsVO);

  List<TowerCraneWorkStatisticsVO> getStatisticsOrderByMachineryTop(TowerCraneWorkStatisticsVO statisticsVO);
  /**
   * 塔吊流水处理
   * @param datapushDTO
   */
  void datapushHandler(DatapushDTO datapushDTO);

  /**
   * 获取塔吊实时数据
   */
  TowerCraneCollisionAlarmRecord selectTowerRealTimeData(Device device, Integer machineryId);

  Page getStatisticsDetailByMachinery(RequestModel<TowerCraneWorkStatisticsVO> requestModel);

  List<MachineryIotDeviceDto> getTowerCraneDevice();

}
